﻿using DHQGHN.DAL.DAO.DHQG;
using DHQGHN.DAL.Models.DHQG;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DHQGHN.DAL.BO.DHQG
{
    public class KehoachThuchienBO : BaseBO
    {
        private KeHoachThucHienDAO _dao;
        public KehoachThuchienBO()
        {
            _dao = new KeHoachThucHienDAO(Common.ConnectionUtil.DHQGHN_CONNECTION_STRING, DEFAULT_MAPPER_TYPE);
        }
        public bool Save(List<KeHoachThucHien> data)
        {
            try
            {
                return _dao.Save(data);
            }
            catch
            {
                throw;
            }
        }
        public List<ChitieuNew> HuyChotKeHoachThucHien(int namkh, int mocks, int donvi)
        {
            try
            {
                return _dao.HuyChotKeHoachThucHien(namkh, mocks, donvi);
            }
            catch
            {
                throw;
            }
        }
        public List<KeHoachThucHien> GetKHTHbyOption(int namkh, int mockiemsoat, int donvi, int chitieu)
        {
            try
            {
                return _dao.GetKHTHbyOption(namkh, mockiemsoat, donvi, chitieu);
            }
            catch
            {
                throw;
            }
        }
        public int InsertKHTHbyOption(int namkhid, int chitieu, int donvi, int mockiemsoat, int flag, string giatri)
        {
            try
            {
                return _dao.InsertKHTHbyOption(namkhid, chitieu, donvi, mockiemsoat, flag, giatri);
            }
            catch
            {
                throw;
            }
        }
        public List<KeHoachThucHien> Getkehoachthrieng(int namkh, int donviid)
        {
            try
            {
                return _dao.Getkehoachthrieng(namkh, donviid);
            }
            catch
            {
                throw;
            }
        }
        public List<KeHoachThucHien> GetallByDV(int namkh, int dv)
        {
            try
            {
                return _dao.GetallByDV(namkh, dv);
            }
            catch
            {
                throw;
            }
        }
        public int CheckFeedBack(int namkh, int donviid, int mocks)
        {
            try
            {
                return _dao.CheckFeedBack(namkh, donviid, mocks);
            }
            catch
            {
                throw;
            }
        }
        public List<KeHoachThucHien> Getkehoachbymockiemsoat(int namkh, int mockiemsoat, int nhomdonvi, int flag)
        {
            try
            {
                return _dao.Getkehoachbymockiemsoat(namkh, mockiemsoat, nhomdonvi, flag);
            }
            catch
            {
                throw;
            }
        }
        public int DeleteKehoachthuchienbyNKH(int namkhid, int status, int nhomchitieu, int nhomdonvi, int mockiemsoat)
        {
            try
            {
                return _dao.DeleteKehoachthuchienbyNKH(namkhid, status, nhomchitieu, nhomdonvi, mockiemsoat);
            }
            catch
            {
                throw;
            }
        }
        public List<ListChiTieu> CheckChot(int namkh, int status, int donviid, int mockiemsoat)
        {
            try
            {
                return _dao.CheckChot(namkh, status, donviid, mockiemsoat);
            }
            catch
            {
                throw;
            }
        }
        public List<KeHoachThucHien> Getallbynamkh(int namkh, int status, int mockiemsoat)
        {
            try
            {
                return _dao.Getallbynamkh(namkh, status, mockiemsoat);
            }
            catch
            {
                throw;
            }
        }
        public int CheckChotbymockiemsoat(int namkh, int donviid, int mockiemsoat)
        {
            try
            {
                return _dao.CheckChotbymockiemsoat(namkh, donviid, mockiemsoat);
            }
            catch
            {
                throw;
            }
        }
        public List<KeHoachThucHien> Getall(int namkh, int flag)
        {
            try
            {
                return _dao.Getall(namkh, flag);
            }
            catch
            {
                throw;

            }
        }
        public List<SumKH> GetSumKehoachthuchien(int namkh, int flag)
        {
            try
            {
                return _dao.GetSumKehoachthuchien(namkh, flag);
            }
            catch
            {
                throw;
            }
        }
    }
}
